home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 493 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.2 KB

  1. Path: chronicle.mti.sgi.com!austern
  2. From: clamage@Eng.Sun.COM (Steve Clamage)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: #warning
  5. Date: 14 Feb 1996 11:36:50 PST
  6. Organization: Sun Microsystems Inc.
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <4ftd0p$c5s@engnews1.Eng.Sun.COM>
  9. References: <270631188wnr@pires.co.uk>
  10. Reply-To: clamage@Eng.Sun.COM
  11. NNTP-Posting-Host: isolde.mti.sgi.com
  12. X-Original-Date: 14 Feb 1996 19:26:17 GMT
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMSI59Uy4NqrwXLNJAQFy6wH9FAaJf5s95wrVCC+kYTr8YJOQ3U7A2iuU
  15.     A1SmRHI9wQgfajiu/qvsJqqC3lg7lJ9NaP6VKYpee4Kg/gEqCgIpKg==
  16.     =ppMK
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. In article 270631188wnr@pires.co.uk, Martin Bonner <mbonner@pires.co.uk> writes:
  20. >Following up from the discussion of "#if XXXX", is there
  21. >any chance of getting "#warning" into the standard? Or is it
  22. >too late
  23. >
  24. >It would be useful.  
  25. >It would be easy to implement.  
  26. >It would achieve something that cannot be achieved in any other way.  
  27. >
  28. >(Have I forgotten anything?)
  29.  
  30. Yes, you forgot to say how it differs from #error, which is already in the
  31. draft (and in Standard C). The description of #error says only that it
  32. "causes the implementation to produce a diagnostic message that includes
  33. the specified sequence of preprocessing tokens."
  34.  
  35. I suspect you have in mind that somehow #error would halt compilation
  36. and #warning would not, but we don't get to talk about those things in
  37. the standard. There needn't be a separate compilation stage, for example,
  38. and an implementation is not required to differentiate between "compile
  39. time" and "run time". Consider a pure interpreter that seems to execute
  40. source code directly, or a "just-in-time" system that compiles a module
  41. or part of a module on the fly the first time it is referenced.
  42.  
  43. The standard describes valid source-language constructs and the effect they
  44. have in an executing program. Details of compiler behavior cannot reasonably
  45. be discussed without placing undesirable constraints on implementations.
  46. ---
  47. Steve Clamage, stephen.clamage@eng.sun.com
  48. ---
  49. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  50.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy is
  51.   in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
  52.